<template>
    <view>
        <popMessageVue :message="message" ref="msgRef"/>
        <button @click="showMessage">message</button>
    </view>
</template>

<script>
    import popMessageVue from "./components/popMessage.vue"
    export default {
        components: {
            popMessageVue
        },
        data() {
            return {
                message: '我是一条message',
                msgRef: null
            }
        },
        methods: {
            showMessage() {
                this.$refs.msgRef.openMessage()
            }
        }
    }
</script>

<style>

</style>
